mudbox::Vertex Struct Reference

#include <mesh.h>

List of all members.


Detailed Description

A Vertex has an x,y,z position in space, a normal, a "Freeze" value between 0.0 and 1.0, and a boolean flag saying whether or not the vertex is currently selected.

Each Mesh object contains a list of Vertex objects.


Public Member Functions

  Vertex (void)
float  Freeze (void) const
  Returns the Freeze value of the Vertex (between 0.0 and 1.0, where 0.0 is not frozen).
void  SetFreeze (float fFreeze)
  Sets the Freeze value of the Vertex (between 0.0 and 1.0, where 0.0 is not frozen).
float  Mask (void) const
  Do not use this method.
void  SetMask (float fMask)
  Do not use this method.
bool  IsSelected (void) const
  Returns the Selected state of the Vertex (true or false).
void  SetSelected (bool bSelected)
  Sets the Selected state of the Vertex (true or false).

Public Attributes

Vector  m_vPos
unsigned int  m_iStrokeID
tnormal  m_vNormal [4]
int  m_iNormalIndex
tnormalv  m_iNormal

Constructor & Destructor Documentation

mudbox::Vertex::Vertex void   )  [inline]
 
00048 { m_iStrokeID = 0; m_iNormal = 0; };

Member Function Documentation

float mudbox::Vertex::Freeze void   )  const [inline]
 

Returns the Freeze value of the Vertex (between 0.0 and 1.0, where 0.0 is not frozen).

The freeze value is used to lock parts of the mesh so they are less affected by sculpting brushes. It is the responsibility of every sculpt brush to take into account the Freeze values on vertices it is modifying.

00067         { return ((float)(unsigned char)(m_vNormal[3]&0x7f))/0x7f; };
void mudbox::Vertex::SetFreeze float  fFreeze  )  [inline]
 

Sets the Freeze value of the Vertex (between 0.0 and 1.0, where 0.0 is not frozen).

The freeze value is used to lock parts of the mesh so they are less affected by sculpting brushes. It is the responsibility of every sculpt brush to take into account the Freeze values on vertices it is modifying.

00076         { m_vNormal[3] = (m_vNormal[3]&0xff80)+(unsigned int)(0x7f*fFreeze); };
float mudbox::Vertex::Mask void   )  const [inline]
 

Do not use this method.

Layer masks should be accessed via LayerMeshData::VertexMask.

00081         { return ((float)(unsigned char)(m_vNormal[3]>>8))/0xff; };
void mudbox::Vertex::SetMask float  fMask  )  [inline]
 

Do not use this method.

Layer masks should be accessed via LayerMeshData::VertexMask.

00086         { m_vNormal[3] = (m_vNormal[3]&0xff)+(((unsigned int)(0xff*fMask))<<8); };
bool mudbox::Vertex::IsSelected void   )  const [inline]
 

Returns the Selected state of the Vertex (true or false).

00089 { return (m_vNormal[3]&0x80) != 0; };
void mudbox::Vertex::SetSelected bool  bSelected  )  [inline]
 

Sets the Selected state of the Vertex (true or false).

00093         { m_vNormal[3] = (m_vNormal[3]&0xff7f)+bSelected*0x80; };

Member Data Documentation

Vector mudbox::Vertex::m_vPos
 
unsigned int mudbox::Vertex::m_iStrokeID [mutable]
 
tnormal mudbox::Vertex::m_vNormal[4]
 
int mudbox::Vertex::m_iNormalIndex
 
tnormalv mudbox::Vertex::m_iNormal